package com.sailfish.springbootdemo.controller.db1;

import com.sailfish.springbootdemo.pojo.Result;
import com.sailfish.springbootdemo.pojo.db1.LineTechCapacityValue;
import com.sailfish.springbootdemo.service.db1.LineTechCapacityValueService;
import com.sailfish.springbootdemo.utils.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/lineTechCapacityValue")
public class LineTechCapacityValueController {

    @Autowired
    private LineTechCapacityValueService lineTechCapacityValueService;

    @PostMapping("/getAllLineTechCapacityValueByLineId")
    public Result getAllLineTechCapacityValueByLineId(Integer pcbaLineId) {
        return lineTechCapacityValueService.getAllLineTechCapacityValueByLineId(pcbaLineId);
    }

    @PostMapping("/updateLineTechCapacityValueDeclareByLineId")
    public Result updateLineTechCapacityValueDeclareByLineId(@RequestBody String data) {
        return lineTechCapacityValueService.updateLineTechCapacityValueDeclareByLineId(data);
    }

    @PostMapping("/updateLineTechCapacityValueActualByLineId")
    public Result updateLineTechCapacityValueActualByLineId(@RequestBody String data) {
        return lineTechCapacityValueService.updateLineTechCapacityValueActualByLineId(data);
    }
}
